home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / DBVGAL17.ARJ / SRC_ASM.ARJ / RETRACE.ASM < prev    next >
Assembly Source File  |  1992-01-25  |  859b  |  40 lines

  1. ;       name    retrace
  2. ; void Vwait_vretrace(void);
  3. ; void Vwait_hretrace(void);
  4. ;
  5. InputStatus1    EQU     03DAh
  6. ;
  7. RETRACE_TEXT   SEGMENT byte public 'CODE'
  8.         ASSUME  cs:RETRACE_TEXT, ds:NOTHING
  9.         PUBLIC  _Vwait_vretrace
  10.         PUBLIC  _Vwait_hretrace
  11.  
  12. _Vwait_vretrace PROC    far
  13.         mov     dx,InputStatus1
  14.         mov     cl,08h
  15.         jmp     @start
  16. _Vwait_vretrace ENDP
  17.  
  18. _Vwait_hretrace PROC    far
  19.         mov     dx,InputStatus1
  20.         mov     cl,01h
  21.         jmp     @start
  22. _Vwait_hretrace ENDP
  23.  
  24. wait_retrace    PROC    far
  25. @start:
  26.         in      al,dx
  27.         and     al,cl
  28.         jnz     @start
  29. @again:
  30.         in      al,dx
  31.         and     al,cl
  32.         jz      @again
  33. @out:
  34.         xor     ah,ah
  35.         ret             ; return to C
  36. wait_retrace   ENDP
  37. RETRACE_TEXT   ENDS
  38.         END
  39.  
  40.